﻿{#template MAIN}
<table id="gridExtraService" cellpadding="5" cellspacing="1" name="gridExtraService"
    class="grid">
    <thead class="sub">
        <tr>
            <th style="width: 100px">
                Date
            </th>
            <th>
                Description
            </th>
            <th style="width: 120px">
                Amount
            </th>
            <th style="width: 80px">
                Shuttle
            </th>
            <th style="width: 80px">
            </th>
        </tr>
    </thead>
    <tbody>
        {#foreach $T.List as extra}
        <tr id='{$T.extra.ExtraID}' class="{#cycle values=['','evenRow']}">
            {#include ROW root=$T.extra}
            <td>
                <a extraid='{$T.extra.ExtraID}' class="btnDelete new">Remove</a>
            </td>
        </tr>
        {#/foreach}
    </tbody>
    <tfoot>
        <tr style="font-weight: bold;">
            <th colspan="5">
                <a href="javascript:void(0)" class="button" onclick="submitExtra('add')"><span>Add</span></a>
            </th>
        </tr>
    </tfoot>
</table>
{#/template MAIN} {#template ROW}
<td>
    <label class="label label_{$T.ExtraID}">
        {formatJSONDate($T.ExtraDate)}</label>
    <input style="display: none" class="input edit_{$T.ExtraID} datepicker" value="{formatJSONDate($T.ExtraDate)}"
        disabled="disabled" />
</td>
<td>
    <label class="label label_{$T.ExtraID}">
        {$.trim($T.Description)}</label>
    <input style="display: none" class="input edit_{$T.ExtraID}" value="{$.trim($T.Description)}" />
</td>
<td style="text-align: right">
    <label class="label label_{$T.ExtraID}">
        {formatCurrency($T.Amount)}</label>
    <input style="display: none" class="input edit_{$T.ExtraID} auto {#if $T.IsShuttle}shuttle{#else}extraAmount{#/if}" value="{formatCurrency($T.Amount)}" />
</td>
<td style="text-align: center">
    <label class="label label_{$T.ExtraID}">
        {#if $T.IsShuttle}Yes{#/if}</label>
    <input style="display: none" type="checkbox" class="input edit_{$T.ExtraID} checkbox" checked="{#if $T.IsShuttle}checked{#/if}" />
</td>
{#/template ROW}